public class PhoneTest {
    public static void main(String[] args) {
        Phone[] arr = new Phone[3];

        Phone p1 = new Phone("小米", 1223, "白色");
        Phone p2 = new Phone("小米", 1233, "黑色");
        Phone p3 = new Phone("huawie", 1234, "白色");
        arr[0] = p1;
        arr[1] = p2;
        arr[2] = p3;
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum += arr[i].getPrice();


        }
        double c= sum/arr.length*1.0;
        System.out.println(c);
    }
}
